import service from '@/utils/request'

// 获取角色列表
export const getRoleList = params => service({
  url: '/admin/permission/role',
  params
})

// 获取角色详细信息
export const getRoleId = id => service({
  url: `/admin/permission/role/${id}`,
  method: 'GET'
})

// 删除角色
export const delRole = id => service({
  url: `/admin/permission/role/${id}`,
  method: 'DELETE'
})

// 新增
export const addRole = data => service({
  url: '/admin/permission/role',
  method: 'POST',
  data
})

// 修改
export const editRole = data => service({
  url: `/admin/permission/role/${data.id}`,
  method: 'PUT',
  data
})

